use "/Users/LeeJoonHyeok/Desktop/CBI_CAL.dta"

global controls loggdpcap lntradeopen lnreservegdp signed_imf peg
xtset ccode year

eststo: xtreg f.ckaopen2010 c.CBIE##i.democracy i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.democracy $controls i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.polconiii_3cat i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.polconiii_3cat $controls i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.v2x_freexp_3cat i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.v2x_freexp_3cat $controls i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace

esttab using "Table1.rtf"	///
	, replace label nobase order(CBIE 1.democracy 1.democracy#c.CBIE 2.polconiii_3cat 3.polconiii_3cat 2.polconiii_3cat#c.CBIE 3.polconiii_3cat#c.CBIE 2.v2x_freexp_3cat 3.v2x_freexp_3cat 2.v2x_freexp_3cat#c.CBIE 3.v2x_freexp_3cat#c.CBIE) ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps scalars("fixed Country FE") ar2(2) sfmt(%9.2f %9.0f)    ///
	indicate("Year FE = *year*")			///
	noconstant
eststo clear

xtreg f.ckaopen2010 c.CBIE##i.democracy $controls i.year, fe cluster(ccode)
margins, at(CBIE = (0 (.1) 1)) over(democracy)
marginsplot, graphregion(color(white)) l(90)

xtreg f.ckaopen2010 c.CBIE##i.polconiii_3cat $controls i.year, fe cluster(ccode)
margins, at(CBIE = (0 (.1) 1)) over(polconiii_3cat)
marginsplot, graphregion(color(white)) l(90)

xtreg f.ckaopen2010 c.CBIE##i.v2x_freexp_3cat $controls i.year, fe cluster(ccode)
margins, at(CBIE = (0 (.1) 1)) over(v2x_freexp_3cat)
marginsplot, graphregion(color(white)) l(90)

global controls2 l.loggdpcap d.loggdpcap l.lntradeopen d.lntradeopen l.lnreservegdp d.lnreservegdp signed_imf peg

xtunitroot fisher ckaopen2010, dfuller lags(3) trend demean
xtunitroot fisher CBIE, dfuller lags(3) trend demean
xtcointtest kao ckaopen2010 CBIE, lags(3) demean

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 if democracy == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 if democracy == 0, pairwise c(ar1)

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 if polconiii_3cat == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 if polconiii_3cat == 2, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 if polconiii_3cat == 3, pairwise c(ar1)

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 if v2x_freexp_3cat == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 if v2x_freexp_3cat == 2, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 if v2x_freexp_3cat == 3, pairwise c(ar1)

esttab using "Table2.rtf"	///
	, label replace nobase ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps r2(2) sfmt(%9.2f %9.0f)    ///
	noconstant
eststo clear

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if democracy == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if democracy == 0

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if polconiii_3cat == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if polconiii_3cat == 2

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if polconiii_3cat == 3

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if v2x_freexp_3cat == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if v2x_freexp_3cat == 2

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if v2x_freexp_3cat == 3

sum ckaopen2010 CBIE democracy polconiii v2x_freexp $controls

eststo: xtreg f.ckaopen2010 c.CBIE##c.vdem i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##c.vdem $controls i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##c.polconiii i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##c.polconiii $controls i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##c.v2x_freexp i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##c.v2x_freexp $controls i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace

esttab using "TableA2.rtf"	///
	, replace label nobase order(CBIE vdem c.CBIE#c.vdem polconiii c.CBIE#c.polconiii v2x_freexp c.CBIE#c.v2x_freexp) ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps scalars("fixed Country FE") ar2(2) sfmt(%9.2f %9.0f)    ///
	indicate("Year FE = *year*")			///
	noconstant
eststo clear

eststo: xtpcse d.ka l.ka l.CBIE d.CBIE $controls2 if democracy == 1, pairwise c(ar1)
eststo: xtpcse d.ka l.ka l.CBIE d.CBIE $controls2 if democracy == 0, pairwise c(ar1)
eststo: xtpcse d.kai l.kai l.CBIE d.CBIE $controls2 if democracy == 1, pairwise c(ar1)
eststo: xtpcse d.kai l.kai l.CBIE d.CBIE $controls2 if democracy == 0, pairwise c(ar1)
eststo: xtpcse d.kao l.kao l.CBIE d.CBIE $controls2 if democracy == 1, pairwise c(ar1)
eststo: xtpcse d.kao l.kao l.CBIE d.CBIE $controls2 if democracy == 0, pairwise c(ar1)

esttab using "TableA3.rtf"	///
	, label replace nobase order(L.ka L.kai L.kao) ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps r2(2) sfmt(%9.2f %9.0f)    ///
	noconstant
eststo clear

ivreg ka CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ka = l.ka CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if democracy == 1

ivreg ka CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.ka = l.ka CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if democracy == 0

ivreg kai CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.kai = l.kai CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if democracy == 1

ivreg kai CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.kai = l.kai CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if democracy == 0

ivreg kao CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.kao = l.kao CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if democracy == 1

ivreg kao CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf (d.kao = l.kao CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp) if democracy == 0

eststo: xtreg f.lnfdi c.ckaopen2010##c.CBIE i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.lnfdi c.ckaopen2010##c.CBIE loggdpcap gdpgrowth vdem lntradeopen lnreservegdp peg i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace

esttab using "TableA4.rtf"	///
	, replace label nobase ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps scalars("fixed Country FE") ar2(2) sfmt(%9.2f %9.0f)    ///
	indicate("Year FE = *year*")			///
	noconstant
eststo clear

xtreg f.lnfdi c.ckaopen2010##c.CBIE loggdpcap gdpgrowth vdem lntradeopen lnreservegdp peg i.year, fe cluster(ccode)
margins, dydx(ckaopen2010) at(CBIE = (0 (.1) 1))
marginsplot, graphregion(color(white))

eststo: xtreg f.ckaopen2010 c.CBIE##i.democracy $controls iirckaopen i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.polconiii_3cat $controls iirckaopen i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.v2x_freexp_3cat $controls iirckaopen i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace

esttab using "TableA5.rtf"	///
	, replace label nobase order(CBIE 1.democracy 1.democracy#c.CBIE 2.polconiii_3cat 3.polconiii_3cat 2.polconiii_3cat#c.CBIE 3.polconiii_3cat#c.CBIE 2.v2x_freexp_3cat 3.v2x_freexp_3cat 2.v2x_freexp_3cat#c.CBIE 3.v2x_freexp_3cat#c.CBIE) ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps scalars("fixed Country FE") ar2(2) sfmt(%9.2f %9.0f)    ///
	indicate("Year FE = *year*")			///
	noconstant
eststo clear

global controls3 loggdpcap lntradeopen lnreservegdp signed_imf peg USalignment

eststo: xtreg f.ckaopen2010 c.CBIE##i.democracy $controls3 i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.polconiii_3cat $controls3 i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.v2x_freexp_3cat $controls3 i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace

esttab using "TableA6.rtf"	///
	, replace label nobase order(CBIE 1.democracy 1.democracy#c.CBIE 2.polconiii_3cat 3.polconiii_3cat 2.polconiii_3cat#c.CBIE 3.polconiii_3cat#c.CBIE 2.v2x_freexp_3cat 3.v2x_freexp_3cat 2.v2x_freexp_3cat#c.CBIE 3.v2x_freexp_3cat#c.CBIE) ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps scalars("fixed Country FE") ar2(2) sfmt(%9.2f %9.0f)    ///
	indicate("Year FE = *year*")			///
	noconstant
eststo clear

global controls3 loggdpcap lntradeopen lnreservegdp lnfindevelop lndebttogdp signed_imf peg 

eststo: xtreg f.ckaopen2010 c.CBIE##i.democracy $controls3 i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.polconiii_3cat $controls3 i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace
eststo: xtreg f.ckaopen2010 c.CBIE##i.v2x_freexp_3cat $controls3 i.year, fe cluster(ccode)
estadd local fixed "Yes" , replace

esttab using "TableA7.rtf"	///
	, replace label nobase order(CBIE 1.democracy 1.democracy#c.CBIE 2.polconiii_3cat 3.polconiii_3cat 2.polconiii_3cat#c.CBIE 3.polconiii_3cat#c.CBIE 2.v2x_freexp_3cat 3.v2x_freexp_3cat 2.v2x_freexp_3cat#c.CBIE 3.v2x_freexp_3cat#c.CBIE) ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps scalars("fixed Country FE") ar2(2) sfmt(%9.2f %9.0f)    ///
	indicate("Year FE = *year*")			///
	noconstant
eststo clear

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.iirckaopen d.iirckaopen if democracy == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.iirckaopen d.iirckaopen if democracy == 0, pairwise c(ar1)

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.iirckaopen d.iirckaopen if polconiii_3cat == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.iirckaopen d.iirckaopen if polconiii_3cat == 2, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.iirckaopen d.iirckaopen if polconiii_3cat == 3, pairwise c(ar1)

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.iirckaopen d.iirckaopen if v2x_freexp_3cat == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.iirckaopen d.iirckaopen if v2x_freexp_3cat == 2, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.iirckaopen d.iirckaopen if v2x_freexp_3cat == 3, pairwise c(ar1)

esttab using "TableA8.rtf"	///
	, label replace nobase ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps r2(2) sfmt(%9.2f %9.0f)    ///
	noconstant
eststo clear

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf iirckaopen d.iirckaopen (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp iirckaopen l.iirckaopen) if democracy == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf iirckaopen d.iirckaopen (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp iirckaopen l.iirckaopen) if democracy == 0

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf iirckaopen d.iirckaopen (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp iirckaopen l.iirckaopen) if polconiii_3cat == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf iirckaopen d.iirckaopen (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp iirckaopen l.iirckaopen) if polconiii_3cat == 2

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf iirckaopen d.iirckaopen (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp iirckaopen l.iirckaopen) if polconiii_3cat == 3

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf iirckaopen d.iirckaopen (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp iirckaopen l.iirckaopen) if v2x_freexp_3cat == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf iirckaopen d.iirckaopen (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp iirckaopen l.iirckaopen) if v2x_freexp_3cat == 2

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf iirckaopen d.iirckaopen (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp iirckaopen l.iirckaopen) if v2x_freexp_3cat == 3

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.USalignment d.USalignment if democracy == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.USalignment d.USalignment if democracy == 0, pairwise c(ar1)

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.USalignment d.USalignment if polconiii_3cat == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.USalignment d.USalignment if polconiii_3cat == 2, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.USalignment d.USalignment if polconiii_3cat == 3, pairwise c(ar1)

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.USalignment d.USalignment if v2x_freexp_3cat == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.USalignment d.USalignment if v2x_freexp_3cat == 2, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls2 l.USalignment d.USalignment if v2x_freexp_3cat == 3, pairwise c(ar1)

esttab using "TableA9.rtf"	///
	, label replace nobase ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps r2(2) sfmt(%9.2f %9.0f)    ///
	noconstant
eststo clear

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf USalignment d.USalignment (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp USalignment l.USalignment) if democracy == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf USalignment d.USalignment (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp USalignment l.USalignment) if democracy == 0

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf USalignment d.USalignment (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp USalignment l.USalignment) if polconiii_3cat == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf USalignment d.USalignment (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp USalignment l.USalignment) if polconiii_3cat == 2

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf USalignment d.USalignment (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp USalignment l.USalignment) if polconiii_3cat == 3

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf USalignment d.USalignment (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp USalignment l.USalignment) if v2x_freexp_3cat == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf USalignment d.USalignment (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp USalignment l.USalignment) if v2x_freexp_3cat == 2

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp peg signed_imf USalignment d.USalignment (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp USalignment l.USalignment) if v2x_freexp_3cat == 3

global controls4 l.loggdpcap d.loggdpcap l.lntradeopen d.lntradeopen l.lnreservegdp d.lnreservegdp l.lnfindevelop d.lnfindevelop l.lndebttogdp d.lndebttogdp signed_imf peg

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls4 if democracy == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls4 if democracy == 0, pairwise c(ar1)

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls4 if polconiii_3cat == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls4 if polconiii_3cat == 2, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls4 if polconiii_3cat == 3, pairwise c(ar1)

eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls4 if v2x_freexp_3cat == 1, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls4 if v2x_freexp_3cat == 2, pairwise c(ar1)
eststo: xtpcse d.ckaopen2010 l.ckaopen2010 l.CBIE d.CBIE $controls4 if v2x_freexp_3cat == 3, pairwise c(ar1)

esttab using "TableA10.rtf"	///
	, label replace nobase ///
 	se(2) b(2) ///
	star(* 0.1 ** 0.05 *** 0.01) ///
	compress nogaps r2(2) sfmt(%9.2f %9.0f)    ///
	noconstant
eststo clear

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp lnfindevelop d.findevelop lndebttogdp d.lndebttogdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp lnfindevelop l.lnfindevelop lndebttogdp l.lndebttogdp) if democracy == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp lnfindevelop d.findevelop lndebttogdp d.lndebttogdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp lnfindevelop l.lnfindevelop lndebttogdp l.lndebttogdp) if democracy == 0

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp lnfindevelop d.findevelop lndebttogdp d.lndebttogdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp lnfindevelop l.lnfindevelop lndebttogdp l.lndebttogdp) if polconiii_3cat == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp lnfindevelop d.findevelop lndebttogdp d.lndebttogdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp lnfindevelop l.lnfindevelop lndebttogdp l.lndebttogdp) if polconiii_3cat == 2

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp lnfindevelop d.findevelop lndebttogdp d.lndebttogdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp lnfindevelop l.lnfindevelop lndebttogdp l.lndebttogdp) if polconiii_3cat == 3

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp lnfindevelop d.findevelop lndebttogdp d.lndebttogdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp lnfindevelop l.lnfindevelop lndebttogdp l.lndebttogdp) if v2x_freexp_3cat == 1

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp lnfindevelop d.findevelop lndebttogdp d.lndebttogdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp lnfindevelop l.lnfindevelop lndebttogdp l.lndebttogdp) if v2x_freexp_3cat == 2

ivreg ckaopen2010 CBIE d.CBIE loggdpcap d.loggdpcap lntradeopen d.lntradeopen lnreservegdp d.lnreservegdp lnfindevelop d.findevelop lndebttogdp d.lndebttogdp peg signed_imf (d.ckaopen2010 = l.ckaopen2010 CBIE l.CBIE loggdpcap l.loggdpcap lntradeopen l.lntradeopen lnreservegdp l.lnreservegdp lnfindevelop l.lnfindevelop lndebttogdp l.lndebttogdp) if v2x_freexp_3cat == 3
